home *** CD-ROM | disk | FTP | other *** search
- //========================================================================================
- //
- // File: PalFrame.h
- // Release Version: $ 1.0d11 $
- //
- // Author: Henri Lamiraux
- //
- // Copyright: © 1993, 1995 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef PALFRAME_H
- #define PALFRAME_H
-
- // ----- OS Layer -----
-
- #ifndef FLOATFRM_H
- #include "FloatFrm.h"
- #endif
-
- //========================================================================================
- // Forward Declaration
- //========================================================================================
-
- #if FW_LIB_EXPORT_PRAGMAS
- #pragma import on
- #endif
- class FW_CLASS_ATTR FW_CFacetContext;
- class FW_CLASS_ATTR FW_CColor;
- class FW_CLASS_ATTR FW_CMouseEvent;
- #if FW_LIB_EXPORT_PRAGMAS
- #pragma import off
- #endif
-
- class FW_CLASS_ATTR CGrid;
-
- //========================================================================================
- // CPalette
- //========================================================================================
-
- class FW_CLASS_ATTR CPalette
- {
- //----------------------------------------------------------------------------------------
- // Initialization/destruction
- //
- public:
- CPalette();
- virtual ~ CPalette();
-
- //----------------------------------------------------------------------------------------
- // New API
- //
- public:
- void GetColor(short colorIndex, FW_CColor* color) const;
- short NumberOfColors() const
- {return fNumbersOfColors;}
-
- //----------------------------------------------------------------------------------------
- // Data Members
- //
- private:
- short fNumbersOfColors;
- #ifdef FW_BUILD_MAC
- CTabHandle fColorTable;
- #endif
- #ifdef FW_BUILD_WIN
- PALETTEENTRY* fColorTable;
- #endif
- };
-
- //========================================================================================
- // CPaletteFrame
- //========================================================================================
-
- class FW_CLASS_ATTR CPaletteFrame : public CFloatingWindowFrame
- {
- //----------------------------------------------------------------------------------------
- // Initialization/destruction
- //
- public:
- CPaletteFrame(Environment* ev, ODFrame* odFrame, FW_CPresentation* presentation, CContainerPart* containerPart);
- virtual ~ CPaletteFrame();
-
- //----------------------------------------------------------------------------------------
- // Inherited API
- //
- public:
- virtual void Draw(Environment* ev, ODFacet* odFacet, ODShape* invalidShape);
- virtual FW_Boolean DoMouseDown(Environment* ev, const FW_CMouseEvent& theMouseEvent);
-
- virtual void FacetAdded(Environment* ev, ODFacet* facet);
-
- //----------------------------------------------------------------------------------------
- // Data Members
- //
- private:
- CPalette* fPalette;
- CGrid *fGrid;
- };
-
- #endif
-